﻿@model Core.Models.User

@{
    ViewBag.Title = "Details";
    Layout = ((Core.Models.Theme)Session["Theme"]).Layout;
    Core.Models.ContactUser cu = Model.Contact.ContactUsers.First(m => m.ContactId == Model.ContactId);
}

<h2>User Information</h2>
<table border="0" cellpadding="5" cellspacing="0" width="90%">
<tr>
    <td valign="top">
    <fieldset>

        <div class="display-label">FirstName</div>
        <div class="display-field">@Model.Contact.FirstName</div>

        <div class="display-label">LastName</div>
        <div class="display-field">@Model.Contact.LastName</div>

        <div class="display-label">Email</div>
        <div class="display-field">@Model.Contact.Email</div>

        <div class="display-label">Approved?</div>
        <div class="display-field">@Core.Tools.YesNo(cu.IsApprovedYN)</div>

        <div class="display-label">Locked Out?</div>
        <div class="display-field">@Core.Tools.YesNo(cu.IsLockedOutYN)</div>

        <div class="display-label">Last Activity</div>
        <div class="display-field">@String.Format("{0:g}", cu.LastActivityDT)</div>

    </fieldset>
    </td>
    <td valign="top">
    <fieldset>

        <div class="display-label">Create Date Time</div>
        <div class="display-field">@String.Format("{0:g}", Model.Contact.CreatedDT)</div>

        <div class="display-label">Created By</div>
        <div class="display-field">@Model.Contact.CreatedByName</div>

        <div class="display-label">Modified Date Time</div>
        <div class="display-field">@String.Format("{0:g}", Model.Contact.ModifiedDT)</div>

        <div class="display-label">Modified By</div>
        <div class="display-field">@Model.Contact.ModifiedByName</div>

    </fieldset>
    </td>
</tr>
<tr>
    <td colspan="2">
        &nbsp;
    </td>
</tr>
<tr>
    <td colspan="2">
        @Html.ActionLink("Edit", "Edit", new { id = @Model.UserId }) |
        @Html.ActionLink("Delete", "Delete", new { id = @Model.UserId }) |
        @Html.ActionLink("Re-register", "Reset", new { id = @Model.UserId }) |
        @Html.ActionLink("Back to List", "Index", new { id = Model.BusinessUnitId})
    </td>
</tr>
</table>
